package com.party.core.dao.read.crowdfund;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.crowdfund.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 众筹事件数据写入
 * Created by wei.li
 *
 * @date 2017/4/25 0025
 * @time 16:22
 */

@Repository
public interface CrowdfundEventReadDao extends BaseReadDao<CrowdfundEvent> {
    List<CrowdfundEventWithMemberPartner> webListPage(@Param(value = "event") CrowdfundEventWithMemberPartner crowdfundEvent,
                                                      @Param(value = "params") Map<String, Object> params, Page page);

    List<CrowdfundEvent> listWithParams(@Param("event") CrowdfundEvent crowdfundEvent, @Param("params")Map<String, Object> params);

    CrowdfundEventCount getEventCountResult(String eventId);

    /**
     * 根据项目id查主题
     * @param targetId
     * @return
     */
    CrowdfundEvent getCorwdfundByActivityId(@Param("targetId")String targetId);

    /**
     * 根据音频查主题
     * @param crowdfundEvent
     * @return
     */
    List<CrowdfundEvent> findEventByAudio(CrowdfundEvent crowdfundEvent);

    CrowdfundEvent findByProjectId(@Param(value = "projectId") String projectId);

    /**找到所有多场没有截止的的活动
    * @author      hzq
    * @param
    * @date        2019/4/10 16:56
    */
    List<CrowdfundEvent> getMultipleCrowdfundEvent();

    List<CrowdfundEvent> getPriceIsNull();
}
